package no.saiboten.tourbuilder.user;

import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Component;

@Component
@Scope(value = "request", proxyMode = ScopedProxyMode.TARGET_CLASS)
public class UserStatusImpl implements UserStatus {

	boolean value = false;
	User user;

	@Override
	public boolean isAuthenticated() {
		return value;
	}

	public void setAuthenticated(boolean value) {
		this.value = value;
	}

	@Override
	public User getAuthenticatedUser() {
		return user;
	}

	public void setAuthenticatedUser(User user) {
		this.user = user;
	}

}
